<template>
    <div class="edu-page-warp">
        <el-card
            v-if="
                user.userType === '1' &&
                rollInfo.wfType != 64 &&
                rollInfo.wfType != 43 &&
                rollInfo.wfType != 133 &&
                rollInfo.wfType != 135 &&
                rollInfo.wfType != 137 &&
                rollInfo.wfType != 151 &&
                rollInfo.wfType != 162 &&
                rollInfo.wfType != 141 &&
                rollInfo.wfType != 14 &&
                rollInfo.wfType != 102 &&
                rollInfo.wfType != 103 &&
                rollInfo.wfType != 107 &&
                rollInfo.wfType != 179 &&
                !showUndCultureTemp
                &&!showScoreAndClassTemp
            "
            shadow="never"
            body-style="padding: 24px; margin-bottom: -14px;"
        >
            <div class="edu-detail-title">
                <img class="student-logo" src="/static/images/icon_pohto_male.png" alt />
                <span>{{ user.name }}</span>
                <div class="float-right">
                    <span class="text-light-gray">申请编号：</span>
                    {{ rollInfo.no }}
                </div>
            </div>
            <el-row :gutter="20" class="edu-info-list">
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">工号：</label>
                        <span class="majoy-tex span">{{ user.code }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">姓名：</label>
                        <span class="majoy-text span">{{ user.name }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">性别：</label>
                        <span class="majoy-text span">{{ user.sexI18n }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">国籍：</label>
                        <span class="majoy-text span">{{ user.countryI18n }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">职称：</label>
                        <span class="majoy-text span">{{ user.title }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">教师类型：</label>
                        <span class="majoy-text span">{{ user.teacherTypeI18n }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">联系方式：</label>
                        <span class="majoy-text span">{{ user.phone }}</span>
                    </div>
                </el-col>
                <!-- <el-col :span="6">
          <div class="item-group">
            <label class="secondary-text label">授课资格：</label>
            <span class="majoy-text span">{{ user.condition }}</span>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="item-group">
            <label class="secondary-text label">授课开始时间：</label>
            <span class="majoy-text span">{{ user.startDate | formatDate }}</span>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="item-group">
            <label class="secondary-text label">授课结束时间：</label>
            <span class="majoy-text span">{{ user.endDate | formatDate }}</span>
          </div>
                </el-col>-->
            </el-row>
        </el-card>
        <el-card
            v-if="
                user.userType === '2' &&
                rollInfo.wfType != 64 &&
                rollInfo.wfType != 166 &&
                rollInfo.wfType != 167 &&
                rollInfo.wfType != 163 &&
                rollInfo.wfType != 164 &&
                rollInfo.wfType != 136 &&
                rollInfo.wfType != 98 &&
                rollInfo.wfType != 150 &&
                rollInfo.wfType != 161 &&
                rollInfo.wfType != 169 &&
                rollInfo.wfType != 168 &&
                rollInfo.wfType != 14 &&
                rollInfo.wfType != 102 &&
                rollInfo.wfType != 103 &&
                rollInfo.wfType != 160&&
                rollInfo.wfType != 107 &&
                rollInfo.wfType != 179 &&
               !showScoreAndClassTemp &&
                !showUndCultureTemp
            "
            shadow="never"
            body-style="padding: 24px; margin-bottom: -14px;"
        >
            <div class="edu-detail-title">
                <img class="student-logo" src="/static/images/icon_pohto_male.png" alt />
                <span>{{ user.name }}</span>
                <div class="float-right">
                    <span class="text-light-gray">申请编号：</span>
                    {{ rollInfo.no }}
                </div>
            </div>
            <el-row :gutter="20" class="edu-info-list">
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">学号：</label>
                        <span class="majoy-tex span">{{ user.studentId }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">性别：</label>
                        <span class="majoy-text span">{{ user.sexI18n }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">年级：</label>
                        <span class="majoy-text span">{{ user.grade }}级</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">培养层次：</label>
                        <span class="majoy-text span">{{ user.trainingLevelI18n }}</span>
                    </div>
                </el-col>
                <template v-if="user.trainingLevelI18n == '本科'">
                    <el-col :span="6">
                        <div class="item-group">
                            <label class="secondary-text label">学院：</label>
                            <span class="majoy-text span">{{ user.facultyI18n }}</span>
                        </div>
                    </el-col>
                    <el-col :span="6">
                        <div class="item-group">
                            <label class="secondary-text label">专业：</label>
                            <span class="majoy-text span">{{ user.professionI18n }}</span>
                        </div>
                    </el-col>
                </template>
                <!-- <el-col :span="6">
          <div class="item-group">
            <label class="secondary-text label">导师：</label>
            <span class="majoy-text span">{{ user.teacherName }}</span>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="item-group">
            <label class="secondary-text label">申请时间：</label>
            <span class="majoy-text span">{{ rollInfo.time | formatDate }}</span>
          </div>
                </el-col>-->
            </el-row>
        </el-card>
        <el-card
            v-if="
                user.userType === '3' &&
                rollInfo.wfType != 43 &&
                rollInfo.wfType != 64 &&
                rollInfo.wfType != 14 &&
                rollInfo.wfType != 102 &&
                rollInfo.wfType != 103 &&
                rollInfo.wfType != 107 &&
                rollInfo.wfType != 179 &&
                !showUndCultureTemp &&!showScoreAndClassTemp
            "
            shadow="never"
            body-style="padding: 24px; margin-bottom: -14px;"
        >
            <div class="edu-detail-title">
                <img class="student-logo" src="/static/images/icon_pohto_male.png" alt />
                <span>{{ user.userName }}</span>
                <div class="float-right">
                    <span class="text-light-gray">申请编号：</span>
                    {{ rollInfo.no }}
                </div>
            </div>
            <el-row :gutter="20" class="edu-info-list">
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">账号：</label>
                        <span class="majoy-tex span">{{ user.userId }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">用户名：</label>
                        <span class="majoy-tex span">{{ user.userName }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">部门：</label>
                        <span class="majoy-text span">{{ user.deptName }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">联系电话：</label>
                        <span class="majoy-text span">{{ user.mobilePhone }}</span>
                    </div>
                </el-col>
                <el-col :span="6">
                    <div class="item-group">
                        <label class="secondary-text label">联系邮箱：</label>
                        <span class="majoy-text span">{{ user.email }}</span>
                    </div>
                </el-col>
            </el-row>
        </el-card>
        <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if=" !showScoreAndClassTemp && rollInfoExist && !showUndCultureTemp&&rollInfo.wfType != 166&&rollInfo.wfType != 167&&rollInfo.wfType != 163&&rollInfo.wfType != 164&&rollInfo.wfType != 133&&rollInfo.wfType != 135&&rollInfo.wfType != 136&&rollInfo.wfType != 137&&rollInfo.wfType != 98&&rollInfo.wfType != 150&&rollInfo.wfType != 151&&rollInfo.wfType != 161&&rollInfo.wfType != 162&&rollInfo.wfType != 169&&rollInfo.wfType != 168&&rollInfo.wfType != 141&&rollInfo.wfType != 14&&rollInfo.wfType != 102&&rollInfo.wfType != 103&&rollInfo.wfType != 160&&rollInfo.wfType != 107 && rollInfo.wfType != 179"
        >
            <h1 class="condition-title">申请明细及审批</h1>
            <el-row v-if="rollInfo.content" :gutter="20" class="edu-info-list">
                <el-col>
                    <div class="item-group">
                        <label
                            class="secondary-text label"
                            v-if="
                                rollInfo.wfType != 18 &&
                                rollInfo.wfType != 20 &&
                                rollInfo.wfType != 64 &&
                                rollInfo.wfType != 43
                            "
                        >
                            详细修改：
                        </label>
                        <collegeTemplate v-if="rollInfo.wfType == 9" :content="rollInfo.content" />
                        <schoolTemplate v-if="rollInfo.wfType == 10" :content="rollInfo.content" />
                        <courseTemplate
                            v-if="
                                rollInfo.result == 'Process' &&
                                (rollInfo.wfType == 14 || rollInfo.wfType == 21)
                            "
                            :content="rollInfo.content"
                            :history="rollInfo.listApproveHistory"
                            :approval-info="approvalInfo"
                            :wf-type="rollInfo.wfType"
                            ref="childTemplate"
                        />
                    </div>
                </el-col>
            </el-row>

            <el-row v-if="rollInfo.content" :gutter="20" class="edu-info-list">
                <div v-if="rollInfo.wfType != 19" class="item-group">
                    <div class="display-inline-block">
                        <cultureTemplate v-if="rollInfo.wfType == 11" :content="rollInfo.content" />
                        <teacherTemplate v-if="rollInfo.wfType == 12" :content="rollInfo.content" />
                        <abnormalTemplate
                            v-if="
                                rollInfo.wfType == 13 ||
                                rollInfo.wfType == 15 ||
                                rollInfo.wfType == 16 ||
                                rollInfo.wfType == 17
                            "
                            :content="rollInfo.content"
                        />
                        <!--培养计划-->
                        <culturePlanTemplate
                            v-if="rollInfo.wfType == 18"
                            :content="rollInfo.content"
                        />
                        <infomationTemplate
                            v-if="rollInfo.wfType == 20"
                            :content="rollInfo.content"
                        />
                    </div>
                </div>
                <div
                    v-if="rollInfo.wfType == 19"
                    class="item-group"
                    style="width: 100%; margin-left: 12px"
                >
                    <div class="display-inline-block" style="width: 100%">
                        <classAdjustmentTemplate
                            :content="rollInfo.content"
                        ></classAdjustmentTemplate>
                    </div>
                </div>
                <!--教学进度-->
                <div
                    v-if="rollInfo.wfType == 43"
                    class="item-group"
                    style="width: 100%; margin-left: 12px"
                >
                    <div class="display-inline-block" style="width: 100%">
                        <progressAuditTemplate
                            :content="rollInfo.content"
                            :commentHideFlag="commentHideFlag"
                            @updateComment="updateComment"
                            ref="progressAuditTemplate"
                        ></progressAuditTemplate>
                    </div>
                </div>
                <!--教室申请-->
                <div
                    v-if="rollInfo.wfType == 64"
                    class="item-group"
                    style="width: 100%; margin-left: 12px"
                >
                    <div class="display-inline-block" style="width: 100%">
                        <classroomApplyWorkFlowTemplate
                            :content="rollInfo.content"
                            ref="classroomApplyWorkFlowTemplate"
                        ></classroomApplyWorkFlowTemplate>
                    </div>
                </div>
            </el-row>
            <el-row
                v-if="
                    rollInfo.content &&
                    rollInfo.wfType != 18 &&
                    rollInfo.wfType != 20 &&
                    rollInfo.wfType != 43 &&
                    rollInfo.wfType != 19 &&
                    rollInfo.wfType != 64
                "
                :gutter="20"
                class="edu-info-list"
            >
                <el-col>
                    <div class="item-group">
                        <label class="secondary-text label">签字版培养方案扫描件：</label>
                        <el-button
                            v-for="(item, index) in rollInfo.content.evidenceList"
                            :key="index"
                            type="text"
                            @click="handleGetFile(item)"
                        >
                            {{ item.substr(10) }}
                        </el-button>
                    </div>
                </el-col>
                <!-- <el-col>
                    <div class="item-group">
                        <label class="secondary-text label">修改说明：</label>
                        <span class="majoy-text span">
                            <span
                                v-if="rollInfo.wfType == 13 || rollInfo.wfType == 15 ||rollInfo.wfType == 16||rollInfo.wfType == 17"
                            >{{ rollInfo.content.reason }}</span>
                            <span v-else>{{ rollInfo.content.editRemark }}</span>
                        </span>
                    </div>
                </el-col>-->
            </el-row>
            <div class="hr"></div>
            <el-row
                v-if="rollInfo.content && rollInfo.wfType == 64"
                :gutter="20"
                class="edu-info-list"
            >
                <el-col>
                    <div class="item-group">
                        <label class="secondary-text label">审批类型：</label>
                        <span class="majoy-text span">教室借用</span>
                    </div>
                </el-col>
            </el-row>
            <el-row
                v-if="rollInfo.content && rollInfo.isNeedOaNum"
                :gutter="20"
                class="edu-info-list"
            >
                <el-col>
                    <div class="item-group" style="width: 100%">
                        <label class="secondary-text label">OA单号：</label>
                        <div class="display-inline-block" style="width: 50%">
                            <span class="majoy-text" style="width: 100%">
                                <el-input
                                    v-model="approvalInfo.oaNo"
                                    :disabled="rollInfo.result != 'Process'"
                                    placeholder="请输入单号"
                                    style="width: 100%"
                                />
                            </span>
                        </div>
                    </div>
                </el-col>
            </el-row>
            <el-row v-if="rollInfo.content" :gutter="20" class="edu-info-list">
                <el-col>
                    <div class="item-group" style="width: 100%">
                        <label class="secondary-text label">审批说明：</label>
                        <div class="display-inline-block" style="width: 50%">
                            <span class="majoy-text" style="width: 100%">
                                <el-input
                                    v-if="rollInfo.wfType != 14 && rollInfo.wfType != 21"
                                    :rows="3"
                                    v-model="approvalInfo.content"
                                    :disabled="rollInfo.result != 'Process'"
                                    :class="[
                                        rollInfo.result != 'Process'
                                            ? 'inputDisableStyle'
                                            : 'inputStyle',
                                    ]"
                                    type="textarea"
                                    placeholder="请输入内容"
                                    style="width: 100%; min-height: 80px"
                                    maxlength="500"
                                />
                                <el-input
                                    v-if="rollInfo.wfType == 14 || rollInfo.wfType == 21"
                                    :rows="3"
                                    v-model="approvalInfo.remark"
                                    :disabled="rollInfo.result != 'Process'"
                                    :class="[
                                        rollInfo.result != 'Process'
                                            ? 'inputDisableStyle'
                                            : 'inputStyle',
                                    ]"
                                    type="textarea"
                                    placeholder="请输入内容"
                                    style="width: 100%; min-height: 80px"
                                    maxlength="500"
                                />
                            </span>
                        </div>
                    </div>
                </el-col>
            </el-row>
            <el-row
                v-if="
                    rollInfo.content &&
                    rollInfo.wfType != 19 &&
                    rollInfo.wfType != 43 &&
                    rollInfo.wfType != 64
                "
                :gutter="20"
                class="edu-info-list"
            >
                <el-col>
                    <div
                        class="item-group"
                        style="width: 100%; margin-left: 67px; margin-top: 10px"
                    >
                        <div class="secondary-text" style="margin-bottom: 15px">
                            学科专业委员会审核认定版：
                        </div>
                        <div class="display-inline-block">
                            <el-upload
                                :headers="{ 'X-Token': $store.state.session.sessionid }"
                                :data="{ bucketname: 'face', folderpath: 'file' }"
                                :on-preview="handleAvatarPreview"
                                :on-remove="handleAvatarRemove"
                                :on-success="handleAvatarSuccess"
                                :before-upload="beforeAvatarUpload"
                                :disabled="rollInfo.result != 'Process'"
                                class="upload-demo"
                                action="/api/commonservice/obsfile/uploadfile"
                                multiple
                            >
                                <el-button
                                    :disabled="rollInfo.result != 'Process'"
                                    size="small"
                                    type="primary"
                                >
                                    点击上传
                                </el-button>
                                <div slot="tip" class="el-upload__tip">
                                    只能上传jpg / png / gif / doc / docx / xlsx
                                    /PDF格式的文件，且文件不超过10M
                                </div>
                            </el-upload>
                        </div>
                    </div>
                </el-col>
            </el-row>
            <div class="edu-opertion-bar">
                <div class="float-right">
                    <el-button
                        :disabled="rollInfo.result != 'Process'"
                        type="danger"
                        @click="submiteReject"
                    >
                        驳回
                    </el-button>
                    <el-button
                        :disabled="rollInfo.result != 'Process'"
                        type="primary"
                        @click="submiteThrough"
                    >
                        通过
                    </el-button>
                    <!-- <el-button
                        v-if="canAuditOption"
                        type="primary"
                        @click="applyAuditPerson()"
                    >指定审核人</el-button> -->
                </div>
            </div>
        </el-card>
        <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if=" !showScoreAndClassTemp && rollInfoExist && !showUndCultureTemp&&rollInfo.wfType != 166&&rollInfo.wfType != 167&&rollInfo.wfType != 163&&rollInfo.wfType != 164&&rollInfo.wfType != 133&&rollInfo.wfType != 135&&rollInfo.wfType != 136&&rollInfo.wfType != 137&&rollInfo.wfType != 98&&rollInfo.wfType != 150&&rollInfo.wfType != 151&&rollInfo.wfType != 161&&rollInfo.wfType != 162&&rollInfo.wfType != 169&&rollInfo.wfType != 168&&rollInfo.wfType != 141&&rollInfo.wfType != 14&&rollInfo.wfType != 102&&rollInfo.wfType != 103&&rollInfo.wfType != 160&&rollInfo.wfType != 107&&rollInfo.wfType != 179"
        >
            <h1 class="condition-title">审批进度</h1>
            <el-table :data="rollInfo.listApproveHistory" stripe style="width: 100%">
                <el-table-column prop="id" label="序号" width="80" />
                <el-table-column prop="time" label="时间" width="160">
                    <template slot-scope="scope">{{ scope.row.time | formatDate }}</template>
                </el-table-column>
                <!-- <el-table-column prop="approvorName" label="审批人" width="120"/> -->
                <el-table-column label="审批人" width="150">
                    <template slot-scope="scope">
                        {{ scope.row.approvorName }}({{ scope.row.approvorId }})
                    </template>
                </el-table-column>
                <el-table-column prop="role" label="角色" width="120" />
                <el-table-column prop="result" label="审批结果" width="120">
                    <template slot-scope="scope">
                        <el-tag v-if="scope.row.result == 'COMMIT'" type="success">提交</el-tag>
                        <el-tag v-if="scope.row.result == 'Process'" type="success">通过</el-tag>
                        <el-tag v-if="scope.row.result == 'End'" type="info">已结束</el-tag>
                        <el-tag v-if="scope.row.result == 'Reject'" type="warning">已驳回</el-tag>
                        <el-tag v-if="scope.row.result == 'Recall'" type="warning">撤回</el-tag>
                    </template>
                </el-table-column>
                <el-table-column prop="oaNo" label="OA单号" />
                <el-table-column prop="content" label="审批说明" show-overflow-tooltip />
                <el-table-column prop="fileInfo" label="审批材料">
                    <template slot-scope="scope">
                        <div v-if="rollInfo.wfType == 11 || rollInfo.wfType == 18">
                            <div v-if="scope.row.fileInfo">
                                <el-tooltip
                                    :content="item"
                                    placement="bottom"
                                    effect="light"
                                    v-for="item in scope.row.fileInfo.approveAttachment"
                                    :key="item"
                                >
                                    <p class="down-link" @click="handleGetFile(item)">
                                        {{ item }}
                                    </p>
                                </el-tooltip>
                            </div>
                        </div>
                        <div v-else>
                            <div v-if="scope.row.fileInfo">
                                <el-button
                                    v-for="item in scope.row.fileInfo.approveDoc"
                                    :key="item"
                                    type="text"
                                    @click="handleGetFile(item.fileLacation)"
                                >
                                    {{ item.fileName }}
                                </el-button>
                            </div>
                        </div>
                    </template>
                </el-table-column>
            </el-table>
        </el-card>
        <!-- 本科生培养方案 -->
        <div v-if="showUndCultureTemp">
            <undCultureTempCom :dataInfo="rollInfo"  :fromCheckDetail="fromCheckDetail" />
        </div>
            <div v-if="showScoreAndClassTemp">
              <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if="rollInfo.wfType == 111"
        >
            <bachelorShowDetail
                :checkInfo="checkInfo"
                :isBachel="true"
                isCanAudit="true"
                :fromCheckDetail="fromCheckDetail" />
        </el-card>
         <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if="
                rollInfo.wfType == 170 ||
                rollInfo.wfType == 171 ||
                rollInfo.wfType == 172 ||
                rollInfo.wfType == 173
            "
        >
            <CreditcheckDetail :applyCheckTableMessage="checkInfo"
            :isBachel="true" :user="user"
             isCanAudit="true"
            :fromCheckDetail="fromCheckDetail"
            />
        </el-card>
         <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if="rollInfo.wfType ==22||rollInfo.wfType ==63"
        >
            <searchPageInner :checkInfo="checkInfo" :isBachel="true"
             :isCanAudit="true"
             v-if="checkInfo.content.affirmType==1"
            :fromCheckDetail="fromCheckDetail"/>
            <!-- 校外 -->
           <searchPageOutter :checkInfo="checkInfo" :isBachel="true"
             :isCanAudit="true"
             v-if="checkInfo.content.affirmType==2"
            :fromCheckDetail="fromCheckDetail"/>
        </el-card>
        <!-- 课程成绩变更 -->
         <el-card
            shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if="rollInfo.wfType ==30"
        >
            <socreChangeLookover :checkInfo="checkInfo" :isBachel="true"
             :isCanAudit="true"
            :fromCheckDetail="fromCheckDetail"/>
        </el-card>
        <!-- 成绩变更老师/教务员 -->
        <el-card  shadow="never"
            body-style="padding: 24px;"
            class="card-margin"
            v-if="rollInfo.wfType ==42||rollInfo.wfType ==44">
            <studentScoreDeatil :checkInfo="checkInfo" :isAgent="true" :isBachel="true" :isCanAudit="true"
            :fromCheckDetail="fromCheckDetail"/>
        </el-card>
        </div>
        <!-- 预答辩审核 -->
        <div v-if="rollInfo.wfType==166">
          <preDefense  :rollInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 培养过程综合评价导师审核 -->
        <div v-if="rollInfo.wfType==167">
          <!-- :stuInfo="rollInfo.content" :dataInfo="rollInfo" -->
          <academicApproveComponent :dataInfo="rollInfo"  pathKey="audit" :isRead="true" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 论文阶段成果学术报告会-申请报告审批 -->
        <div v-if="rollInfo.wfType==163||rollInfo.wfType==164">
          <paperAuditPage :rollInfo="rollInfo" :row="rollInfo" pathKey="paperAudit" auditType="suggestionStatus" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 实习基地审核 -->
        <div v-if="rollInfo.wfType==133">
          <baseList :dataInfo="rollInfo"  :fromCheckDetail="fromCheckDetail"/>
        </div>

         <!-- 经费管理审核 -->
        <div v-if="rollInfo.wfType==135">
          <fundingManagement :dataInfo="rollInfo" pathKey="audit" type="audit"  :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 分散实习申请 -->
        <div v-if="rollInfo.wfType==136">
          <dispersionPracticeApply :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 分散实习申请 -->
        <div v-if="rollInfo.wfType==137">
          <practiceReworkManagement :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 大专招生专业计划 -->
        <div v-if="rollInfo.wfType==98">
          <recruitPlan :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 课题变更审核 -->
        <div v-if="rollInfo.wfType==141">
          <changeAudit :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 学生选题审核 -->
        <div v-if="rollInfo.wfType==160&&!global.isAdmin">
          <ReviewStudentTopic :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>
        <div v-if="rollInfo.wfType==160&&global.isAdmin">
          <reviewTeacherStuSelect :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!--   导师课题审核 -->
        <div v-if="rollInfo.wfType==151">
          <reviewSubjectDesignated :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>
        <!-- 学生课题申报 -->
        <div v-if="rollInfo.wfType==150">
          <reviewSubjectTutor :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

        <!-- 提交开题报告 -->
        <div v-if="rollInfo.wfType==161">
          <reviewReportTutor :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 提交任务书 -->
        <div v-if="rollInfo.wfType==162">
          <taskAudit :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 学生中期检查 -->
        <div v-if="rollInfo.wfType==169">
          <reviewMidTermCheck :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <!-- 毕业论文设计 -->
        <div v-if="rollInfo.wfType==168">
          <reviewGraduationDesign :dataInfo="rollInfo" :fromCheckDetail="fromCheckDetail" :idTip="this.$route.query.id"/>
        </div>

         <div v-if="rollInfo.wfType==14">
             <CourseApproveDetail :approveId="rollInfo.no" :courseId="rollInfo.content.id" :waitToDo="true" :options="{}" :isReadOnly="fromCheckDetail" :showBack="false"/>
        </div>
        <div v-if="rollInfo.wfType==102||rollInfo.wfType==103">
             <textBookForm :dic="{manageDept:[],textbookCategory:[],publishHouseId:[],college:[],schoolAuthorCollege:[],trainingLevel:[]}" :isDisabled="true" :isCheck="!fromCheckDetail" :waitToDo="true" :waitToDoContent="rollInfo"/>
        </div>

        <div v-if="rollInfo.wfType==179">
             <graduateShortTermApply :dataInfo="rollInfo" :waitToDo="!this.$route.query.fromCheckDetail" />
        </div>

         <div v-if="rollInfo.wfType==107">
             <teachingTextBookDetail :options="{}" :publishHouseId="[]" :currentTeachingClass="{}" :waitToDo="true" :waitToDoContent="rollInfo" :isChecked="!fromCheckDetail"/>
        </div>
    </div>
</template>
<script>
import { mapActions } from 'vuex'
import { approvelDetail, approvalThrough, approvalReject } from 'common/src/api/approval'
import { findListPage } from '../../api/progress/auditTeacher'
import { canAuditOption, assign } from '../../api/progress/progressList'
import { findUserInfoByIdType, findLocalUserById } from 'common/src/api/user'
import { getApplyInfoByWorkflowNo } from 'common/src/api/resource/classroom'
import { downloadfile } from 'common/src/api/upload'
import TermAdjustmentApi from 'common/src/api/course/termAdjustment'
import filters from 'common/src/filters'
import schoolTemplate from './rollTemplate/schoolTemplate'
import collegeTemplate from './rollTemplate/collegeTemplate'
import cultureTemplate from './rollTemplate/cultureTemplate'
import teacherTemplate from './rollTemplate/teacherTemplate'
import abnormalTemplate from './rollTemplate/abnormalTemplate'
import personalPlanDetail from '../culture/plan/personalPlanDetail'
import classAdjustmentTemplate from './rollTemplate/classAdjustmentTemplate'
import courseTemplate from './rollTemplate/courseTemplate'
import culturePlanTemplate from './rollTemplate/culturePlanTemplate'
import progressAuditTemplate from './rollTemplate/progressAuditTemplate'
import infomationTemplate from './rollTemplate/infomationTemplate'
import classroomApplyWorkFlowTemplate from '../resource/classroom/components/classroomApplyWorkFlowTemplate'
import { schemefindResult } from 'common/src/api/culture/cultruescheme'
import mixin from 'common/src/mixins/index';
export default {
    name: 'student-roll-detail',
    mixins: [mixin],
    components: {
        schoolTemplate,
        collegeTemplate,
        cultureTemplate,
        teacherTemplate,
        abnormalTemplate,
        personalPlanDetail,
        courseTemplate,
        culturePlanTemplate,
        progressAuditTemplate,
        classAdjustmentTemplate,
        infomationTemplate,
        classroomApplyWorkFlowTemplate,
        undCultureTempCom: (resolve) => require(['./rollTemplate/undCultureTempCom'], resolve),
        bachelorShowDetail: () => import('common/src/views/score/bachelor/bachelorShowDetail'),
        CreditcheckDetail: () => import('common/src/views/score/bachelor/component/checkDetail'),
        searchPageInner: () => import('common/src/views/score/creditApply/searchPageInner'),
        searchPageOutter: () => import('common/src/views/score/creditApply/searchPageOutter'),
        socreChangeLookover: () => import('common/src/views/score/scoreModification/socreChangeLookover'),
        studentScoreDeatil: () => import('common/src/views/score/scoreModification/studentScoreDeatil'),
        preDefense:()=> import('common/src/views/preDefense/preDefenseAudit/preDefenseAudit'),
        academicApproveComponent:()=> import('common/src/views/academicGuide/academicApply/index'),
        paperAuditPage:()=> import('common/src/views/paperAchievements/paperAudit/paperAudit'),
        baseList:()=> import('common/src/views/practiceManagement/baseList/index'),
        fundingManagement:()=> import('common/src/views/practiceManagement/fundingManagement/index'),
        dispersionPracticeApply:()=> import('common/src/views/practiceManagement/dispersionPracticeApply/index'),
        practiceReworkManagement:()=> import('common/src/views/practiceManagement/practiceReworkManagement/index'),
        recruitPlan:()=> import('common/src/views/majorEnsure/recruitPlan/recruitPlan'),
        reviewSubjectTutor:()=> import('common/src/views/underGraduationDesign/topicSelectMgt/reviewSubject/reviewSubjectTutor'),
        ReviewSubjectDesignated:()=> import('common/src/views/underGraduationDesign/topicSelectMgt/reviewSubject/reviewSubjectDesignated'),
        reviewReportTutor:()=> import('common/src/views/underGraduationDesign/documentMgt/reviewOpeningReport/reviewReportTutor'),
        taskAudit:()=> import('common/src/views/underGraduationDesign/documentMgt/taskbook/taskAudit'),
        reviewMidTermCheck:()=> import('common/src/views/underGraduationDesign/documentMgt/reviewMidTermCheck/reviewMidTermCheck'),
        reviewGraduationDesign:()=> import('common/src/views/underGraduationDesign/documentMgt/reviewGraduationDesign/reviewGraduationDesign'),
        changeAudit:()=> import('common/src/views/underGraduationDesign/topicSelectMgt/topicsAudit/topicAudit'),
        ReviewStudentTopic:()=> import('common/src/views/underGraduationDesign/topicSelectMgt/reviewStudentTopic/reviewStudentTopic'),
        reviewTeacherStuSelect:()=> import('common/src/views/underGraduationDesign/topicSelectMgt/reviewTeacherStuSelect/reviewTeacherStuSelect'),
        CourseApproveDetail:()=> import('common/src/views/resource/courses/component/CourseApproveDetail'),
        textBookForm:()=> import('common/src/views/textBook/textBookInfo/textBookForm'),
        graduateShortTermApply:()=> import('common/src/views/course/component/graduateShortTermApply'),
        teachingTextBookDetail:()=> import('common/src/views/textBook/teachingTextBook/teachingTextBookDetail'),
    },
    filters: {
        formatDate(date) {
            return filters.formatDate(date, 'yyyy/MM/dd hh:mm:ss')
        },
    },
    data() {
        return {
            auditTeacher: {},
            teacherForm: {
                condition: {
                    deptId: '2',
                    calendarId: '',
                    teachnicalTitle: '',
                    inFaculty: '',
                    auditFaculty: '',
                    name: '',
                    keyWord: '',
                },
                pageNum_: 1,
                pageSize_: 20,
                total: 0,
            },
            teacherList: {
                list: [],
                total_: 0,
            },
            rollInfo: [],
            user: {},
            id: '',
            fromCheckDetail: false,
            idTip:'',
            checkInfo: {}, //本科生成绩
            approvalInfo: {
                no: '',
                content: '',
                oaNo: '',
                approveAttachment: [],
                approveDoc: [],
                remark: null,
            },
            commentHideFlag: false,
            faculty: '', //课程开课学院
            canAuditOption: false,
            teachingClassId: '',
            progress: {},
            dataProcess: [], //数据列表传参,
            showUndCultureTemp: false, //本科生培养方案审批
            showScoreAndClassTemp:false,//成绩模块强化班教室
        }
    },
    computed: {
        rollInfoExist() {
            let show = Object.keys(this.rollInfo || {}).length
            return !!show
        },
    },
    mounted() {},
    created() {
        this.id = this.$route.query.id
        this.commentHideFlag = this.$route.query.commentFlag
        this.faculty = this.$route.query.faculty
        this.initPage(this.id)
    },
    methods: {
        updateComment(data, teachingClassId, progress) {
            this.dataProcess = data
            this.teachingClassId = teachingClassId
            this.progress = progress
            // canAuditOption(this.progress.deptId,this.teachingClassId).then(resp=>{
            //     if(resp.code ==200){
            //         this.canAuditOption =resp.data&&resp.data.showBtnFlag;
            //         console.log(this.canAuditOption,"requestCanAuditOption");
            //     }
            // });
        },
        ...mapActions(['delTab']),
        _init_(user) {
            const query = 'userId=' + user.uid + '&type=' + user.type
            findUserInfoByIdType(query).then((res) => {
                if (res.code === 200 && res.data) {
                    res.data.userType = user.type
                    this.user = res.data
                }
            })
        },
        beforeAvatarUpload(file) {
            let testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
            const extension = testmsg === 'jpeg'
            const extension1 = testmsg === 'jpg'
            const extension2 = testmsg === 'png'
            const extension3 = testmsg === 'gif'
            const extension4 = testmsg === 'doc'
            const extension5 = testmsg === 'docx'
            const extension6 = testmsg === 'xlsx'
            const extension7 = testmsg === 'PDF'
            const extension8 = testmsg === 'pdf'
            const isLt2M = file.size / 1024 / 1024 < 10
            if (
                !extension &&
                !extension1 &&
                !extension2 &&
                !extension3 &&
                !extension4 &&
                !extension5 &&
                !extension6 &&
                !extension7 &&
                !extension8
            ) {
                this.$message.error('请上传正确格式!')
            }
            if (!isLt2M) {
                this.$message.error('上传文件大小不能超过 10MB!')
            }
            return (
                extension ||
                extension1 ||
                extension2 ||
                extension3 ||
                extension4 ||
                extension5 ||
                extension6 ||
                extension7 ||
                (extension8 && isLt2M)
            )
        },
        _initLocalUser(uid) {
            findLocalUserById('userId=' + uid).then((res) => {
                if (res.code === 200 && res.data) {
                    this.user = res.data
                    this.user.name = res.data.userName
                }
            })
        },
        initPage(id) {
            if (!id) {
                return
            }
            if (this.$route.query.fromCheckDetail) {
                this.fromCheckDetail = true
            }
            let params
            if (this.fromCheckDetail) {
                params = {
                    no: id,
                    type: 2,
                }
            } else {
                params = {
                    no: id,
                }
            }
            approvelDetail(params).then((res) => {
                if (res && res.data) {
                    this.checkInfo = res.data //本科生成绩
                    const _user = {
                        uid: res.data.applicantId,
                        type: res.data.userType ? res.data.userType : '2',
                    }

                    if (res.data.userType === '3') {
                        this._initLocalUser(_user.uid)
                    } else {
                        this._init_(_user)
                    }

                    this.approvalInfo.no = res.data.no
                    res.data.content = JSON.parse(res.data.content)
                    _.forEach(res.data.listApproveHistory, function (item) {
                        item.fileInfo = JSON.parse(item.fileInfo)
                    })
                    this.rollInfo = res.data
                    this.showUndCultureTemp = this.showUndCultureTempFn();
                    this.showScoreAndClassTemp=this.showScoreAndClassTempFn()
                    if (this.showUndCultureTemp) {
                        return;
                    }
                    if (res.data.wfType * 1 == 43) {
                        let approveList = res.data && res.data.listApproveHistory
                        let length = approveList.length
                        this.approvalInfo.content =
                            length >= 2
                                ? approveList[length - 1].result == 'Reject'
                                    ? approveList[length - 1].content
                                    : ''
                                : ''
                        this.requestCanAuditOption()
                    }
                    if (
                        (res.data.wfType * 1 == 11 &&
                            res.data.content &&
                            res.data.content.projId != 1) ||
                        res.data.wfType * 1 == 18
                    ) {
                        this.getTime()
                        if (res.data.listApproveHistory.length > 0) {
                            res.data.listApproveHistory[0].fileInfo = {
                                approveAttachment: res.data.content.evidenceList,
                            }
                        }
                        console.log(res.data.content)
                    }
                    /**
                     * 如果是教室借用功能 因为页面数据展示需要计算复杂，放弃从工作流中拿取的content， 直接根据no查询审批表中的具体数据
                     * yidonge 教室借用审核功能 2019-09-16
                     **/
                    if (res.data.wfType == '64') {
                        getApplyInfoByWorkflowNo(res.data.no).then((response) => {
                            if (response && response.data) {
                                let applyData = response.data
                                applyData.classroomNameStr = this.getClassroomNameStrByList(
                                    applyData.classroomApplyDetailVoList
                                )
                                applyData.borTimeStr = this.getBorTimeStrByList(
                                    applyData.classroomApplyDetailVoList
                                )
                                applyData.campusStr = this.getCampusStrByList(
                                    applyData.classroomApplyDetailVoList
                                )
                                this.rollInfo.content = applyData
                                if (this.commentHideFlag) {
                                    // add by quanwei
                                    this.approvalInfo.content = applyData.approvalOpinion // 教室管理审批说明
                                }
                            }
                        })
                    }

                }
            })
        },
        getTime() {
            let currentUser =
                (this.$store.state.session && this.$store.state.session.user) ||
                JSON.parse(localStorage.getItem('user'))
            let data = {
                grade: '', // 年级
                deptCode: '', // 学院
                startTime: '', // 开始时间
                stopTime: '', // 结束时间
                projId: '',
                projIdStr: this.$route.query.projId,
            }
            schemefindResult(data).then((res) => {
                if (res.code == 200) {
                    const resData = res.data || {};
                    this.approvalInfo.startTime = resData.startTime
                    this.approvalInfo.endTime = resData.stopTime
                }
            })
        },
        //把教室名称数据转换成需要展示的样子
        getClassroomNameStrByList(list) {
            let str = ''
            let tempList = []
            if (list != null) {
                list.forEach((index) => {
                    let classroomName = index.classroomName
                    if (!tempList.includes(classroomName)) {
                        str += classroomName + ' |'
                        tempList.push(classroomName)
                    }
                })
                str = str.substr(0, str.length - 1)
            }
            return str
        },
        //把借用时间转换成需要展示的样子
        getBorTimeStrByList(list) {
            let str = ''
            if (list != null) {
                list.forEach((index) => {
                    str += index.borTimeStr + ' |'
                })
                str = str.substr(0, str.length - 1)
            }
            return str
        },
        //把校区数据转换成需要展示的样子
        getCampusStrByList(list) {
            let str = ''
            if (list != null) {
                str = list[0].campusI18n
            }
            return str
        },
        handleAvatarPreview() {},
        handleAvatarRemove(file, fileList) {
            const removeFile = file.response.data[file.name].objectkey
            _.remove(this.approvalInfo.approveAttachment, function (item) {
                return item === removeFile
            })
            _.remove(this.approvalInfo.approveDoc, function (item) {
                return item.fileLacation === removeFile
            })
        },
        handleAvatarSuccess(response, file, fileList) {
            if (response && response.data) {
                this.approvalInfo.approveDoc.push({
                    fileName: response.data[file.name].fileName,
                    fileLacation: response.data[file.name].objectkey,
                })
                this.approvalInfo.approveAttachment.push(response.data[file.name].objectkey)
            }
        },
        submiteThrough() {
            //课程审批需要提交前验证
            if (this.$refs.childTemplate) {
                let result = this.$refs.childTemplate.valid()
                if (!result) {
                    return
                }
            }
            if (this.rollInfo.wfType == 43) {
                // if(this.canAuditOption){
                //     if(+this.progress.deptId==2&&!this.progress.isAudit){
                //         this.$message({
                //             type:'warning',
                //             message:'请先指定审核人'
                //         })
                //         return
                //     }
                // }
                /*调用子组件方法，获取数据*/
                this.$refs.progressAuditTemplate.blurComment()
                /*更新每条批注*/
                var dataList = this.dataProcess.map((item) => ({
                    id: item.id,
                    comment: item.comment || '',
                    classContent: item.classContent || '',
                    rank: item.rank,
                    teachingClassId: item.teachingClassId,
                    pid: item.teachingClassId,
                }))
                this.approvalInfo.dataProcess = dataList
            }
            if (this.rollInfo.wfType == 11) {
                let now = new Date().getTime()
                console.log(now)
                if (now > this.approvalInfo.endTime || now < this.approvalInfo.startTime) {
                    this.$message({
                        type: 'warning',
                        message: '不在审批范围时间内',
                    })
                    return
                }
            }
            //增加对研究生长期调课的校验
            if (this.rollInfo.wfType == 19) {
                if (this.rollInfo.content.type == 2 && this.rollInfo.content.isGraduate == 1) {
                    //获取参数
                    let restrictParam = {}
                    restrictParam.teachingClassId = this.rollInfo.content.teachingClassId
                    restrictParam.exchangeId = this.rollInfo.content.id
                    //调用接口进行冲突校验
                    TermAdjustmentApi.checkRestrict(restrictParam).then((res) => {
                        if (res.data && res.data.length > 0) {
                            let result = res.data[0]
                            let html = result.descript
                                .split('||')
                                .reduce((a, b) => a + "<hr style='margin:3px'>" + b)
                            html = `<div style="font-size:13px">${html}</div>`
                            this.$alert(html, '排课冲突请进行驳回操作', {
                                dangerouslyUseHTMLString: true,
                                confirmButtonText: this.$t('message.confirm'),
                            })
                        } else {
                            this.submitPass()
                        }
                    })
                } else {
                    this.submitPass()
                }
            } else {
                this.submitPass()
            }
        },
        requestCanAuditOption() {
            this.$nextTick(() => {
                this.$refs.progressAuditTemplate && this.$refs.progressAuditTemplate.blurComment()
            })
        },
        // applyAuditPerson() {
        //     this.findTeacherList();
        //     this.$refs.teacherDialog.open();
        // },
        // findTeacherList() {
        //     this.teacherForm.condition.auditFaculty = this.faculty;
        //     findListPage(this.teacherForm).then(resp => {
        //         if (resp.code == 200) {
        //             this.teacherList.list = resp.data.list;
        //             this.teacherList.total_ = resp.data.total_;
        //         }
        //     });
        // },
        // pageTeacherChange(page) {
        //     this.teacherForm.pageNum_ = page.pageNum;
        //     this.teacherForm.pageSize_ = page.pageSize;
        //     this.findTeacherList();
        // },
        // handleSelectionTeacher(row) {
        //     this.selectedRows = row;
        // },
        // confirm() {
        //     if (this.selectedRows.length != 1) {
        //         this.$message({
        //             type: "warning",
        //             message: "只能选择一条数据"
        //         });
        //         return;
        //     }
        //     // this.$refs.progressAuditTemplate.blurComment();
        //     // this.auditTeacher = this.selectedRows[0];
        //     this.auditTeacher = this.selectedRows[0].jobNum;
        //     const data = {
        //         auditorId : this.auditTeacher,
        //         teachingClassId :this.teachingClassId
        //     }
        //     console.log(data,"data");
        //     assign(data).then(resp=>{
        //         if(resp.code==200){
        //             this.$message({
        //                 type: 'success',
        //                 message: '指定审核人成功'
        //             })
        //             this.progress=Object.assign(this.progress,{isAudit:true})
        //         }
        //     })
        //     this.$refs.teacherDialog.close();
        // },
        // closeForm() {
        //     this.$refs.DialogForm.clearSelection();
        // },
        //代码重复率过高，这里抽取部分代码作为一个独立方法调用
        submitPass() {
            approvalThrough(this.approvalInfo).then((res) => {
                if (this.rollInfo.wfType == 14 || this.rollInfo.wfType == 21) {
                    this.$router.push('/courseApprove')
                    this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 43) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/progressAuditList')
                    //this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 26 || this.rollInfo.wfType == 27) {
                    this.$router.push('/teacherQualificationApply')
                    this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 64) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/classroomReview')
                } else if (this.rollInfo.wfType == 11) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/TeacherRollChecks/11')
                } else {
                    this.$router.push('/TeacherRollCheckApproved')
                }
            })
        },
        submiteReject() {
            // if (this.rollInfo.wfType == 43) {
            //     if(this.canAuditOption){
            //     // this.$refs.progressAuditTemplate.blurComment();
            //     console.log(!this.progress.isAudit,"llll")
            //     console.log(!this.progress,"tttt")
            //     if(+this.progress.deptId==2&&!this.progress.isAudit){
            //         this.$message({
            //             type:'warning',
            //             message:'请先指定审核人'
            //         })
            //         return
            //     }
            //     }
            // }
            let data = _.cloneDeep(this.approvalInfo)
            if (this.rollInfo.wfType == 14 || this.rollInfo.wfType == 21) {
                data.content = data.remark
            }
            if (this.rollInfo.wfType == 43) {
                // this.$refs.progressAuditTemplate.blurComment();
                /*更新每条批注*/
                var dataList = this.dataProcess.map((item) => ({
                    id: item.id,
                    comment: item.comment || '',
                    classContent: item.classContent || '',
                    rank: item.rank,
                    teachingClassId: item.teachingClassId,
                    pid: item.teachingClassId,
                }))
                data.dataProcess = dataList
            }
            if (this.rollInfo.wfType == 11) {
                let now = new Date().getTime()
                console.log(now)
                if (now > this.approvalInfo.endTime || now < this.approvalInfo.startTime) {
                    this.$message({
                        type: 'warning',
                        message: '不在审批范围时间内',
                    })
                    return
                }
            }
            approvalReject(data).then((res) => {
                if (this.rollInfo.wfType == 14 || this.rollInfo.wfType == 21) {
                    this.$router.push('/courseApprove')
                    this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 43) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/progressAuditList')
                    //this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 26 || this.rollInfo.wfType == 27) {
                    this.$router.push('/teacherQualificationApply')
                    this.delTab('/TeacherRollDetail')
                } else if (this.rollInfo.wfType == 11) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/TeacherRollChecks/11')
                } else if (this.rollInfo.wfType == 64) {
                    this.$message({
                        type: "success",
                        message: this.$t('common.tips.opSuccess')
                    });
                    this.$router.go(-1);
                    //this.$router.push('/classroomReview')
                } else {
                    this.$router.push('/TeacherRollCheckApproved')
                }
            })
        },
        handleGetFile(objectkey) {
            if (!objectkey) return

            downloadfile(objectkey)
        },
        showUndCultureTempFn() {
            //本科生培养方案审批
            let show = false
            let { wfType, content } = this.rollInfo || {};
            show = wfType == 11 && content && content.projId == 1
                    || wfType == 18
                    || wfType == 189
                    || wfType == 61
                    || wfType == 152
                    || wfType == 154
                    || wfType == 153
                    || wfType == 155
                    || wfType == 140
                    || wfType == 43 && this.fromCheckDetail
                    || wfType == 65
                    || wfType == 66
                    || wfType == 67
                    || wfType == 68
            return show
        },
        showScoreAndClassTempFn(){
            console.log(this.rollInfo.wfType,'pppp890')
            return this.rollInfo.wfType==111||
            this.rollInfo.wfType ==170||
            this.rollInfo.wfType ==171||
            this.rollInfo.wfType ==172||
            this.rollInfo.wfType ==173||
            this.rollInfo.wfType ==174 ||
             this.rollInfo.wfType==22||
             this.rollInfo.wfType==30||
             this.rollInfo.wfType==42||
             this.rollInfo.wfType==44||
             this.rollInfo.wfType==63

        },
        backFunc(){
          if(rollInfo.wfType==167){
            console.log('11')
          }
        }
    },
    beforeRouteLeave (to, from, next) {

      this.delTab(this.$route.path);
        next();
    },
    watch: {
        $route(to, from) {
            if (to.query.id === undefined && this.id) {
                this.$router.push(`${to.path}?id=${this.id}`)
                return
            }
            if (to.query.id && from.query.id && to.query.id !== from.query.id) {
                this.id = to.query.id
                this.initPage(this.id)
            }
        },
    },
}
</script>
<style lang="scss" scoped>
.div-main {
    margin-bottom: 16px;
}
.el-upload__tip {
    margin-left: 20px;
    display: inline;
    color: #898989;
}
.down-link {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    color: #2876c2;
    margin: 5px 0;
    &:focus {
        outline: none;
    }
    &:hover {
        cursor: pointer;
        text-decoration: underline;
    }
}
</style>
